<!--{template admin/header}-->
<body id="homepage">
    <div id="breadcrumb">
        <ul>
            <li><img src="static/img/icons/icon_breadcrumb.png"
                     alt="Location" /></li>
            <li><strong>位置:</strong></li>
            <li><a href="admin.php">主页</a> - 全部公告列表</li>
        </ul>
    </div>
    <div id="rightside" >
        <div class="contentcontainer">
            <div class="headings altheading">
            <h3><span class="nav_left">全部公告列表</span></h3>
			  </div>            
      		  <div class="contentbox">
                <table width="100%" class="table table-striped">
                    <thead>
                        <tr>     
                            <th>标题</th>                                         
                            <th>内容</th>                                         
                            <th>action</th>
                            <th>图片</th>                    
                            <th>操作</th>                        ,
                        </tr>
                    </thead>
                    
                    <tbody>
                  		<!--{if !empty($list) }-->
                        <!--{loop $list $value}-->
                      		<tr id="tr_{$value[id]}">
                      		<td><!--{$value[data][title]}--></td>
                      		<td><!--{$value[data][content]}--></td>
                      		<td><!--{$value[data][action]}--></td>
                      		<td>
                      		<!--{if $value[data][image]}-->
                      			<img src="{$value[data][image][0]}" style="width:150px;height:100px;" />
                      		<!--{/if}-->
                      		</td>
                      		<td><button class="btn delete_announce" data-feedid={$value[id]}>删除</button></td>
                      		</tr>
                        <!--{/loop}-->
                    <!--{/if}-->
                    </tbody>
                
                </table>                              
                <div style="clear: both;"></div>
            </div>  		
      
            <!--{if $_GET['op'] != searchDiaryTopic}-->
             <div class="extrabottom">
                    <div class="bulkactions">
                        <ul class="pagination">
                            <!--{if $prevpurl!=''}-->
                            <li class="text"><a href="{$firstpurl}" title="">首页</a></li>
                            <li class="text"><a href="{$prevpurl}" title="">上一页</a></li>
                            <!--{/if}-->                       
                            <li class="text"><a href="{$nextpurl}" title="">下一页</a></li>
                        </ul>
                        <div style="clear: both;"></div>
                    </div>
             </div>
             <!--{/if}-->
        </div>
    </div>
    <script src="/static/scripts/jquery.min.js"></script>
    <script type="text/javascript">
    		$(function(){
    			$(document).on('click','.delete_announce',function(){
    				 var feedid = $(this).data('feedid');
     				$.ajax({
     					'type':'POST',
     					'dataType':'json',
     					'url' :'admin.php?ac=send_message&op=removeAnnounce',
     					'data':{'id':feedid},
     					'success':function(data){
     						if(data == 1){
     						   $("#tr_"+feedid).fadeOut();	
     						}else{
     						   alert('删除失败');
     						}
     					}  
      				})
    			});
    		})
    </script>
    <!--{template admin/leftside}-->
    <!--{template admin/footer}-->
    